# -*- coding: utf-8 -*-
from datetime import timedelta, datetime

from jms.dm import jms_dm__cn_address_warehouse_day_rule_dt
from utils.operators.files_bash_operator import FilesBashOperator

# jms_es__cn_address_warehouse_day_rule2es = DummyOperator(
#     task_id='jms_es__cn_address_warehouse_day_rule2es',
#     email='liyuxian@yl-scm.com',
#     retries=0,
#     priority_weight=0,
#     # sla=timedelta(hours=2),
# )

jms_es__cn_address_warehouse_day_rule2es = FilesBashOperator(
    task_id="jms_es__cn_address_warehouse_day_rule2es",
    email=['yushuo@jtexpress.com','yl_bigdata@yl-scm.com'],
    bash_command="jms/es/cn_address_warehouse_day_rule2es/hdfs2es_cn_address_warehouse_day_rule.sh",
    # bash_command='{{"jms/es/cn_address_warehouse_day_rule2es/hdfs2es_cn_address_warehouse_day_rule.sh"}}',
    files=['jms/es/cn_address_warehouse_day_rule2es/hdfs2es_cn_address_warehouse_day_rule.json'],
    execution_timeout=timedelta(hours=2),
    retries=0,
    pool='threecode_es',
    pool_slots=3
)

jms_es__cn_address_warehouse_day_rule2es << [jms_dm__cn_address_warehouse_day_rule_dt]
